package com.app.qbake.module.mine.activity;

import android.content.Context;
import android.os.Bundle;
import android.support.annotation.Nullable;

import com.wind.base.BaseActivity;
import com.wind.base.utils.Navigator;
import com.app.qbake.R;
import com.app.qbake.module.mine.OrderDetailFragment;

import java.io.Serializable;

public class OrderDetailActivity extends BaseActivity {

    public static void start(Context context,ExtraInfo extraInfo){
        Navigator.navigate(context,OrderDetailActivity.class,extraInfo);
    }
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.fragment_container_with_toolbar);

        ExtraInfo extraInfo=Navigator.getSerializableExtra(this);
        replaceFragment(OrderDetailFragment.getInstance(extraInfo.type,extraInfo.orderId));
    }

    @Override
    protected void setTitle() {
        mTitleBar.setTitle("订单详情");
    }

    public static class ExtraInfo implements Serializable{
        public String type;
        public String orderId;

    }
}
